Repository navigation
Refuse unserializing the coordinator from __unserialize() - #156
Merged
Merged
Conversation
PHP 8.5 deprecates __wakeup(), and Psalm 7.16 reports declaring it as DeprecatedSyntax. PHP calls __unserialize() for every unserialize() of the class, so the singleton is still refused with the same escaped LogicException. One test now goes through a real unserialize() call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Thanks for contributing to Optimizations ACE MC! Before we review:
Security Reminder
We'll review your PR soon. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codacy's Semgrep rule flags any unserialize() call, test code included. The test calls the magic method the way it called __wakeup() before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Psalm 7.17 reports MissingExtensionRequirement for filter_var() when composer.json does not require ext-filter. The code needs the extension, so composer.json now requires it; the lock hash is refreshed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PHP 8.5 deprecates
__wakeup(), and Psalm 7.16 reports declaring it asDeprecatedSyntax, which has failed the Psalm job on every pull request since the 7.16 release.Optimizations_Ace_Mc::__wakeup()becomes__unserialize( array $data ). PHP calls it for everyunserialize()of the class, so the singleton is still refused with the same escapedLogicException.__unserialize()where they called__wakeup().composer make-pot).composer.jsonrequiresext-filter, which Psalm 7.17.0 (MissingExtensionRequirement) asks for because the settings class callsfilter_var();composer.lockhas the refreshed content hash only.Checks run locally:
composer check-all(PHPCS, PHPMD, Psalm and taint, PHPStan, Rector, PHPUnit), Plugin Check rules, and PHPCompatibilityWP 8.3+.🤖 Generated with Claude Code